//
//  AdModel.m
//  TengyunStation
//
//  Created by Johnny on 15/9/7.
//  Copyright (c) 2015年 xingrong. All rights reserved.
//

#import "AdModel.h"
#import "SocketMethod.h"

@implementation AdModel

- (id)initWithString:(NSString *)string {
    self = [super init];
    if (self) {
        NSArray *array = [string componentsSeparatedByString:@","];
        self.title = [SocketMethod subArray:array Index:0];
        self.content = [SocketMethod subArray:array Index:1];
        self.link = [SocketMethod subArray:array Index:2];
        self.adPosition = [[SocketMethod subArray:array Index:3] intValue];
        self.adType = [SocketMethod subArray:array Index:4];
        self.startPlayTime = [SocketMethod subArray:array Index:5];
        self.endPlayTime = [SocketMethod subArray:array Index:6];
    }
    return self;
}

@end
